package utils.output.html;

import java.util.ArrayList;
import java.util.Collection;

import objects.Skill_information;


public class List {

	private Integer id;

	public List(Integer id){
		this.id = id;
	}
	
	public String getList_for_collection(Collection<String> items){
		String result = "<ul";
		if(this.id!=null){
			result +="id=\""+this.id+"\"";
		}
		result += ">";
		for(String item : items){
			result += "<li>"+item+"</li>";
		}
		result += "</ul>";
		return result;
	}
	public String getList_for_arrayList_entry(ArrayList<Skill_information> items){
		String result = "<ul";
		if(this.id!=null){
			result +="id=\""+this.id+"\"";
		}
		result += ">";
		for(Skill_information item : items){
			result += "<li>"+item.getSkillname()+"<br />";
			result += item.get_html_skill_information();
			result += "</li>";
		}
		result += "</ul>";
		return result;
	}
	public String getList_for_arrayList(ArrayList<String> items){
		String result = "<ul";
		if(this.id!=null){
			result +="id=\""+this.id+"\"";
		}
		result += ">";
		for(String item : items){
			result += "<li>"+item+"</li>";
		}
		result += "</ul>";
		return result;
	}
}
